package com.golxen.framework.common.server.game.cmd.user.login;


import com.golxen.framework.GameProtocol;
import com.golxen.framework.PBPacket.PBPacket;
import com.golxen.framework.common.server.game.cmd.AbstractCommand;
import com.golxen.framework.common.server.game.cmd.Cmd;
import com.golxen.framework.user.player.GamePlayer;
import com.golxen.framework.user.player.GamePlayerMgr;
import com.golxen.utils.LogUtil;
import com.google.protobuf.Message;

@Cmd(code = GameProtocol.S_PLAYER_LOGOUT, desc = "玩家退出游戏(登出状态)")
public class LogoutGameCmd extends AbstractCommand {

	@Override
	public void execute(GamePlayer player, PBPacket packet) throws Exception {
		LogUtil.COMMON.debug(" logout userId={} isKick={}", packet.getPlayerId(), false);

		GamePlayerMgr.onLogout(player, false);
	}

	@Override
	public Message parseData(PBPacket packet) throws Exception {
		return null;
	}

	@Override
	public void sendData(GamePlayer player) {

	}

}
